// Copyright (c) Microsoft Corporation
// All rights reserved

namespace Microsoft.Windows.Controls.Specialized.TextModel
{
    using System;

    /// <summary>
    /// Describes the transformation on a Text Change.
    /// </summary>
    public struct TextChangeTransform
    {
        #region Private Members

        private bool _ignore;
        private TextChange _newDeletion;

        #endregion // Private Members

        public TextChangeTransform (bool ignore) 
        { 
            _ignore = ignore; 
            _newDeletion = null; 
        }

        public TextChangeTransform (TextChange newDeletion) 
        { 
            _ignore = false; 
            _newDeletion = newDeletion; 
        }

        /// <summary>
        /// Specifies if this text change transform is to be ignored or not
        /// </summary>
        public bool Ignore 
        { 
            get 
            { 
                return _ignore; 
            } 
        }

        /// <summary>
        /// Gets the Deletion Text Change that
        /// </summary>
        /// <value></value>
        public TextChange NewDeletion 
        { 
            get 
            { 
                return _newDeletion; 
            } 
        }
    }
}
